package com.example.demo.dao;

import com.example.demo.model.UserInfo;
import com.example.demo.model.vo.UserInfoVO;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {
    @Insert("insert into userinfo(username,password) values(#{username},#{password})")
    //添加操作返回值是一个受影响的行数
    int reg(UserInfo userInfo);

    @Select("select * from userinfo where username=#{username}")
    UserInfo getUserByName(UserInfoVO userInfoVO);
}
